<template>
  <div>
    <!--头部+banner-->
    <div class="a-1">
      <!--顶部导航-->
      <div class="a-2">
        <div class="a-3">
          <Header v-bind:state="2"></Header>
        </div>
      </div>
      <!--banner-->
      <div class="target e-1" id="target-2">
        <div>
          <div>
            <img src="@/assets/image/ny-banner3.png" />
          </div>
        </div>
      </div>
      <!--消息通知-->
      <div class="a-14">
        <div class="a-15">
          <img class="a-16" src="@/assets/image/tz.png" />
          <div class="a-17">
            <div class="swiper-container swiper-containerOne">
              <div class="swiper-wrapper clearfix">
                <div class="swiper-slide" v-for="(item,index) in noticeList" :key="index">
                  <a href="javascipt:;">{{item.noticeContent}}</a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!--新闻列表-->
    <div class="e-2">
      <div class="e-3">
        <!--路由-->
        <div class="b-8">
          <div class="b-9">
            当前位置：
            <a href="javascript:;">首页</a> >
            <a href="javascript:;">热门权益人</a>
          </div>
        </div>
        <div class="e-4">
          <div class="a-48">
            <div class="a-49">Industry Information</div>
            <div class="a-50">热门权益人</div>
            <img class="a-51" src="@/assets/image/index-9.png" />
          </div>
          <div class="holders-1">
            <ul class="holders-2">
              <li v-for="(v,index)  in tradeNewsList" :key="index">
                <a href="javascript:;">
                  <div class="holders-0">{{index+1}}</div>
                  <div class="holders-3">
                    <img class="holders-4" :src="v.avatar" />
                  </div>
                  <div class="holders-5">
                    <div class="holders-6">{{v.nickName}}</div>
                    <div class="holders-7"></div>
                    <!--								<div class="holders-9">中国影视产业的咨询平台中国影视产业，中国影视产业的咨询平台中国影视产业中国影视产业的咨询平台中国影视产。</div>-->
                  </div>
                  <div class="holders-8">作品数量：{{v.workNum}}</div>
                </a>
              </li>
            

            </ul>
          </div>
          <div class="a-35 h-48">

          <el-pagination
                             @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="pageNum"
      :page-sizes="[10, 50, 100, 200]"
      :page-size="pageSize"
    layout=" pager"
    :total="total">
  </el-pagination>

            <!-- <mo-paging
              :page-index="currentPage"
              :total="totalPage"
              :page-size="pageSize"
              @change="pageChange"
            ></mo-paging> -->
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Header from "@/views/header.vue";
import MoPaging from "@/views/Page";
import { apiTradeHotList } from "@/api/listNews";
var _self;
export default {
  components: {
    Header,
    MoPaging,
  },
  created() {
    //this.noticeList = JSON.parse(window.sessionStorage.getItem("lb"));
   _self = this;
     this.getTradeNewsList();
  },
  data() {
    return {
      noticeList: Array,
      tradeNewsList: [],
      pageSize: 5,
      //totalPage: 1, //总页数
      
      pageNum:0,
      total:0,//总数
    };
  },
  methods: {
    
    getTradeNewsList() {
      let data = { pageNum: _self.pageNum, pageSize: this.pageSize };
      apiTradeHotList(data).then((res) => {
        console.log(res);
        //this.totalPage = response.data.currentPage * this.pageSize;
        this.tradeNewsList = res.rows;
      });
    },
    handleSizeChange:function(e){
           
            _self.pageSize = e;
            _self.init();
        },
        handleCurrentChange:function(e){
           
            _self.pageNum=e;
            _self.init();
        },
  },
  name: "index",
};
</script>

<style >
@import "../../css/index.css";
@import "../../css/list_news.css";
/* @import "../../css/idangerous.swiper.css"; */

 .holders-1{margin-top: 20px;margin-bottom: -30px;}
 .holders-2{font-size: 0;}
 .holders-2 li{width: 100%;box-shadow: 0 0 7px 2px #e1e1e1;display: inline-block;margin-bottom: 30px;}
 .holders-2 li a{display: block;padding: 10px 15px;font-size: 0;}
 .holders-3{width: 50px;height: 50px;border-radius: 100%;box-shadow: -2px 2px 5px 1px #b28f95;overflow: hidden;display: inline-block;vertical-align: middle;}
 .holders-4{width: 50px;height: 50px;}
 .holders-5{display: inline-block;vertical-align: middle;margin-left: 15px;}
 .holders-5{font-size: 14px;}
 .holders-6{font-size: 18px;display: inline-block;vertical-align: middle;margin-left: 30px;}
 .holders-7{width: 40px;border-bottom: 3px solid #b0291f;margin-top: 2px;margin-bottom: 8px;display: none;}
 .holders-8{display: inline-block;vertical-align: middle;float: right;font-size: 14px;margin-top: 15px;}
 .holders-9{color: #666666;border-top: 1px solid #cfcfcf;margin-top: 8px;padding-top: 5px;}
 .holders-0{font-size: 25px;font-style: italic;font-weight: bold;display: inline-block;margin-right: 20px;vertical-align: middle;}
.el-pager li{
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 100%;
    border: 1px solid #d1d1d1;
    color: #cdcdcd;
    font-size: 16px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    vertical-align: top;
    margin-right: 20px;
    }
    .el-pager li.active{
       
    color: #ffa426;
    border-color: #ffa426;

    }
    .el-pager li:hover{
        color: #ffa426;
    }
    .el-pagination .btn-next,.el-pagination .btn-prev{
        padding-top: 14px;
    }
</style>
